package per.com.controller.classmanage;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import per.com.bean.BaseBean;
import per.com.bean.classmanage.ClassManage;
import per.com.service.impl.classmanage.ClassmanageService;

@Controller
@RequestMapping("/Class")
public class ClassmanageController {
    @Autowired
    @Qualifier("ClassmanageServiceId")
    private ClassmanageService classmanageService;

    @RequestMapping(value = "/insertclass",method = RequestMethod.POST)
    @ResponseBody
    public BaseBean insertclass(ClassManage classManage){classmanageService.insertclass(classManage);
        return new BaseBean(0,"success",classManage);
    }
    @RequestMapping(value = "GetClass",method = RequestMethod.POST)
    @ResponseBody
    public BaseBean GetClass(){
        return  new BaseBean(0,"success",classmanageService.GetClass());
    }
}
